package com.voc.im.bean;

import cn.schoolwow.quickdao.annotation.*;
import javafx.beans.property.*;

public class UserRoom {
    private IntegerProperty id;
    private StringProperty jid;
    private StringProperty account;
    private StringProperty nickname;
    private IntegerProperty type;

    public UserRoom() {
    }

    public UserRoom(String jid, String account, String nickname) {
        setId(0);
        setJid(jid);
        setAccount(account);
        setNickname(nickname);
    }

    public UserRoom(int id, String jid, String account, String nickname, int type) {
        setId(id);
        setJid(jid);
        setAccount(account);
        setNickname(nickname);
        setType(type);
    }

    public int getId() {
        return id.get();
    }

    public IntegerProperty idProperty() {
        if (id == null) {
            id = new SimpleIntegerProperty();
        }
        return id;
    }

    public void setId(int id) {
        this.idProperty().set(id);
    }

    public String getJid() {
        return jid.get();
    }

    public StringProperty jidProperty() {
        if (jid == null) {
            jid = new SimpleStringProperty();
        }
        return jid;
    }

    public void setJid(String jid) {
        this.jidProperty().set(jid);
    }

    public String getAccount() {
        return account.get();
    }

    public StringProperty accountProperty() {
        if (account == null) {
            account = new SimpleStringProperty();
        }
        return account;
    }

    public void setAccount(String account) {
        this.accountProperty().set(account);
    }

    public String getNickname() {
        return nickname.get();
    }

    public StringProperty nicknameProperty() {
        if (nickname == null) {
            nickname = new SimpleStringProperty();
        }
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nicknameProperty().set(nickname);
    }

    public Integer getType() {
        return type.get();
    }

    public IntegerProperty typeProperty() {
        if (type == null) {
            type = new SimpleIntegerProperty();
        }
        return type;
    }

    public void setType(int type) {
        this.typeProperty().set(type);
    }
}
